home *** CD-ROM | disk | FTP | other *** search
- Path: newshost.cyberramp.net!news
- From: sinan@cyberramp.net (John Noland)
- Newsgroups: comp.lang.c
- Subject: Re: Invalid Indirection???
- Date: 19 Mar 1996 02:37:41 GMT
- Organization: Prose Software
- Message-ID: <4il6ll$760@newshost.cyberramp.net>
- References: <4i7cck$t67@infa.central.susx.ac.uk> <4iah9k$r02@newshost.cyberramp.net> <826906075snz@genesis.demon.co.uk>
- NNTP-Posting-Host: ramp3-11.cyberramp.net
- X-Newsreader: WinVN 0.99.5
-
- In article <826906075snz@genesis.demon.co.uk>, fred@genesis.demon.co.uk says...
-
- >>tmp = ((tempi[i]_*_tempj[i]) + (tempi[i+1]_*_tempj[i+1]))
- >
- >The white-space here makes no difference at all and woule elicit the same
- >error from the compiler. You also need a ; at the end of the statement.
- >As an observation none of the parentheses in that expression are required.
- >
-
- I did misdiagnose the gentleman's problem. He didn't declare tempi as an
- array. My mistake. I should have looked at his code more carefully, instead
- of just looking at the line with the error.
-
- Tanmoy B. bashed me with this:
- > that it can have `lexical conventions for the evaluation of tokens'
- > whatever that garbage is?
-
- Most compilers come with a special book or file. It's usually called a
- Reference Manual or Reference Guide or Technical Reference or something
- to that effect. In this book there is usually section called 'Lexical
- Conventions' or 'Lexical Elements' or 'Tokens' or 'The Evaluation of Tokens'.
- In K&R there is a section of the appendix named 'Lexical Conventions' which
- I consulted prior to answering the question. My suggestion was for the man
- to consult this resource for his particular compiler. I knew when I answered
- the question that my answer wouldn't be correct for any of the C compilers
- that I've used, I thought, mistakenly, that this aspect of the C language
- might be open to interpretation for the compiler writer and maybe his compiler
- did things differently. I guess I'm just not used to this ANSI compliance
- stuff yet. I'm glad C is finally standardized, though.
-
- -John
-
-